﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace EasyScrum.Models
{   
    public class Story
    {       
        [Key]
        public int StoryId { get; set; }

        [Required]
        [StringLength(100)]
        public string Title { get; set; }

        [Required]
        [StringLength(5000)]
        public string Description { get; set; }

        [Required(ErrorMessage = "'To Do Hours' is required")]
        [DisplayName("To Do Hours")]
        [Range(1, 100, ErrorMessage = "By default, the total 'To Do Hours' cannot exceed 100 hours.")]
        public int ToDo { get; set; }

        [DisplayName("Task Done")]
        [Range(0, 100, ErrorMessage = "By default, the total 'To Do Hours' cannot exceed 100 hours.")]
        public int TaskDone { get; set; }

        //[DisplayName("Start Date")]
        //public DateTime StartDate { get; set; }

        //[DisplayName("End Date")]
        //[ScaffoldColumn(false)]
        //public DateTime EndDate { get; set; }       

        [DisplayName("Story Point")]
        public int StoryPoint { get; set; }

        [DisplayName("Story Status")]
        public int StoryStatus { get; set; }
        
        public List<Task> Tasks { get; set; }
    } 
}